home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global fxpath, mnv, ppl, vppl, trgt, blty, bltx, manleft, psilaa, hppl, bltsprite, psila, xpnt, ypnt, muchpnt
- if not soundBusy(3) then
- sound playFile 3, fxpath & "west.aif"
- end if
- if sprite(3).visible = 1 then
- sprite(3).visible = 0
- end if
- if sprite(9).visible = 1 then
- sprite(10).visible = 1
- sprite(9).visible = 0
- sprite(2).visible = 0
- end if
- if (psila <= 0) and (getAt(mnv, 1) < 2) then
- repeat with i = 1 to 70
- puppetSprite(i, 0)
- sprite(i).visible = 1
- set the keyDownScript to EMPTY
- set the keyUpScript to EMPTY
- end repeat
- go("lost")
- end if
- if random(4) = 1 then
- repeat with i = 2 to count(trgt)
- if getAt(trgt, i) = "a" then
- set the loc of sprite getAt(ppl, i) to point(690, 490)
- setAt(mnv, i, 0)
- setAt(trgt, i, "d")
- setAt(vppl, i, 1000 + i)
- end if
- end repeat
- end if
- if (manleft > 0) and (random(4) = 1) then
- xxx = "no"
- i = 2
- repeat while (i <> "yap") and (i < (count(trgt) + 1))
- if getAt(trgt, i) = "d" then
- xxx = "ok"
- iii = i
- i = "yap"
- next repeat
- end if
- i = i + 1
- end repeat
- if xxx = "ok" then
- hh = [0, 0, 250, 450, 640, 640]
- yy = [225, 340, 480, 480, 400, 260]
- manleft = manleft - 1
- g = random(6)
- setAt(hppl, iii, getAt(hh, g))
- setAt(vppl, iii, getAt(yy, g))
- set the loc of sprite getAt(ppl, iii) to point(getAt(hh, g), getAt(yy, g))
- case g of
- 1:
- set the member of sprite getAt(ppl, iii) to member(93, 1)
- 2:
- set the member of sprite getAt(ppl, iii) to member(93, 1)
- 3:
- set the member of sprite getAt(ppl, iii) to member(67, 1)
- 4:
- set the member of sprite getAt(ppl, iii) to member(67, 1)
- 5:
- set the member of sprite getAt(ppl, iii) to member(93, 1)
- 6:
- set the member of sprite getAt(ppl, iii) to member(93, 1)
- end case
- d = random(2)
- e = [208, 217, 521, 217]
- if d = 1 then
- setAt(trgt, iii, "s")
- setAt(muchpnt, iii, random(3))
- if getAt(muchpnt, iii) = 1 then
- setAt(xpnt, iii, getAt(e, 3))
- setAt(ypnt, iii, getAt(e, 4))
- else
- xtt = getAt(e, 3) - 200 + random(400)
- if xtt < 20 then
- xtt = 20
- end if
- if xtt > 620 then
- xtt = 620
- end if
- setAt(xpnt, iii, xtt)
- setAt(ypnt, iii, getAt(vppl, iii) - random(getAt(vppl, iii) - getAt(e, 4)))
- end if
- else
- setAt(trgt, iii, "b")
- setAt(muchpnt, iii, random(3))
- if getAt(muchpnt, iii) = 1 then
- setAt(xpnt, iii, getAt(e, 1))
- setAt(ypnt, iii, getAt(e, 2))
- else
- xtt = getAt(e, 1) - 200 + random(400)
- if xtt < 0 then
- xtt = 0
- end if
- if xtt > 640 then
- xtt = 640
- end if
- setAt(xpnt, iii, xtt)
- setAt(ypnt, iii, getAt(vppl, iii) - random(getAt(vppl, iii) - getAt(e, 4)))
- end if
- end if
- if g > 4 then
- sprite(getAt(ppl, iii)).flipH = 1
- else
- sprite(getAt(ppl, iii)).flipH = 0
- end if
- end if
- else
- if manleft <= 0 then
- repeat with i = 1 to 70
- puppetSprite(i, 0)
- sprite(i).visible = 1
- set the keyDownScript to EMPTY
- set the keyUpScript to EMPTY
- end repeat
- go("win")
- end if
- end if
- repeat with i = 2 to count(trgt)
- if getAt(trgt, i) <> "d" then
- brain(i)
- end if
- end repeat
- go(marker(0))
- end
-